package top.tangyh.lamp.care.service;

import top.tangyh.basic.base.service.SuperService;
import top.tangyh.lamp.care.entity.BWorkPlan;
import top.tangyh.lamp.care.vo.query.WorkPlanDetailQueryVO;
import top.tangyh.lamp.care.vo.query.WorkPlanQueryVO;
import top.tangyh.lamp.care.vo.result.*;
import top.tangyh.lamp.care.vo.save.BWorkPlanSaveVO;
import top.tangyh.lamp.care.vo.save.WorkPlanInVO;
import top.tangyh.lamp.care.vo.update.BWorkPlanUpdateVO;
import top.tangyh.lamp.care.vo.query.BWorkPlanPageQuery;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;


/**
 * <p>
 * 业务接口
 * 全局的排班表
 * </p>
 *
 * @author zqb
 * @date 2024-07-18 15:42:26
 * @create [2024-07-18 15:42:26] [zqb] [代码生成器生成]
 */
public interface BWorkPlanService extends SuperService<Long, BWorkPlan> {
    /**
     * 获得排班指定模块，指定病人的所有时间点
     *
     * @param moduleId       横块编码，不能为空
     * @param roleId         角色id
     * @param patientIdent   病人识别号
     * @param hospitalNumber 住院号
     * @param currTime       同步班次的 首班日期，不能为空
     * @param shiftId        班次,不能为空
     * @return
     */
    LinkedHashSet<TimePointOutVO> getAllTimePoitByPtAndShift(String moduleId, Long roleId, String patientIdent, String hospitalNumber, Long currTime, Long shiftId);

    List<WorkPlanDetailOutVO> selectWorkPlanDetailListByQuery(WorkPlanDetailQueryVO queryVO);

    LinkedHashSet<TimePointOutVO> getAllTimePoitByPt(String moduleId, Long roleId, String patientIdent, String hospitalNumber, Long startTime, Long endTime, Long currTime);

    Set<Long> getTimePoitSet(String moduleId, Long roleId, Long startTime, Long endTime, Long currTime);

    Set<Long> getTimePoitSet(String moduleId, Long roleId, Long startTime, Long endTime);

    WorkPlanDetailOutVO getShiftTimeSlot(String moduleId, String hospitalNumber, Long roleId, Long currTime, Long shiftId);

    LinkedHashSet<TimePointOutVO> getAllTimePoitByPt(String moduleId, Long roleId, String patientIdent, String hospitalNumber, Long startTime, Long endTime);

    /**
     * 分页查询排班
     * @param queryVO
     * @return
     */
    PageOutputDTO<WorkPlanOutVO> selectPageByQuery(WorkPlanQueryVO queryVO);


    /**
     * 查询时间轴明细
     * @param queryVO
     * @return
     */
    List<WorkPlanDetailOutVO> selectDetailListByQuery(WorkPlanDetailQueryVO queryVO);


    void add(WorkPlanInVO inVO);

    void update(WorkPlanInVO inVO);

    void delete(List<Long> ids);

    /**
     * 获得指定班次的时间轴
     *
     * @param moduleId       模块编码
     * @param hospitalNumber 住院号
     * @param roleId         角色id
     * @param currTime       当前时间
     * @param shiftId        班次编码
     * @return
     */
    Set<Long> getTimePoitSetByShift(String moduleId, String hospitalNumber, Long roleId, Long currTime, Long shiftId);

    /**
     * 获得排班中所有时间点
     *
     * @param currDate 当时时间
     * @param moduleId 横块编码
     * @return
     */
    LinkedHashSet<Long> getAllTimePoit(Long currDate, String moduleId);
}


